using System.Web.Mvc;

namespace Quintsys.BootstrapSupport
{
    public static class ControllerExtensions
    {
        public static void Attention(this Controller controller, string message)
        {
            if (!controller.TempData.ContainsKey(Alerts.Attention))
                controller.TempData.Add(Alerts.Attention, message);
        }

        public static void Success(this Controller controller, string message)
        {
            if (!controller.TempData.ContainsKey(Alerts.Success))
                controller.TempData.Add(Alerts.Success, message);
        }

        public static void Information(this Controller controller, string message)
        {
            if (!controller.TempData.ContainsKey(Alerts.Information))
                controller.TempData.Add(Alerts.Information, message);
        }

        public static void Error(this Controller controller, string message)
        {
            if (!controller.TempData.ContainsKey(Alerts.Error))
                controller.TempData.Add(Alerts.Error, message);
        }
    }
}